#ifndef QTTRANSLATETOEFFECT_H
#define QTTRANSLATETOEFFECT_H

#include "QtSingleAnimationEffect.h"
#include <QPointF>

class QtTranslateToEffect: public QtSingleAnimationEffect
{
public:
	QtTranslateToEffect();
	QtTranslateToEffect(const QtTranslateToEffect& rhs);
	virtual ~QtTranslateToEffect();

	void SetTarget(QtSprite *sprite);
	QtSprite* Target() const;

	void SetEndPosition(const QPointF& position);
	QtAnimationEffect* Clone() const;

protected:
	void SetupAnimation();

private slots:
	void Update(qreal value);

private:
	QPointF endPosition;
	QPointF startPosition;
	QtSprite *target;
};

#endif //QTTRANSLATETOEFFECT_H
